﻿@model ReturnRequestModel
@using Telerik.Web.Mvc.UI;
@{
    //page title
    ViewBag.Title = T("Admin.ReturnRequests.EditReturnRequestDetails").Text;
}
@using (Html.BeginForm())
{
    <div class="section-header">
        <div class="title">
        <img src="@Url.Content("~/subsites/Administration/Content/images/ico-sales.png")" alt="" />
            @T("Admin.ReturnRequests.EditReturnRequestDetails") @Html.ActionLink("(" + T("Admin.ReturnRequests.BackToList") + ")", "List")
        </div>
        <div class="options">
            <input type="submit" name="notify-customer" class="t-button" value="@T("Admin.ReturnRequests.NotifyCustomer")" />
            <input type="submit" name="save" class="t-button" value="@T("Admin.Common.Save")" />
            <input type="submit" name="save-continue" class="t-button" value="@T("Admin.Common.SaveContinue")" />
            <input type="submit" id="copy-productvariant" name="copy-productvariant" class="t-button" value="@T("Admin.Catalog.ProductVariants.OpenBox")" />
            <span id="returnrequest-delete" class="t-button">@T("Admin.Common.Delete")</span>
        </div>
    </div>
    @Html.Partial("_CreateOrUpdate", Model)
}
@Html.DeleteConfirmation("returnrequest-delete")

@*copy product form*@
@{Html.Telerik().Window()
        .Name("copy-productvariant-window")
        .Title(T("Admin.Catalog.ProductVariants.OpenBox").Text)
        .Content(@<text>
            @using (Html.BeginForm("CopyProductVariant", "ReturnRequest"))
            {
                @Html.HiddenFor(model => model.Id)
                <table style="text-align: left;">
                    <tr>
                        <td>
                            @Html.NopLabelFor(model => model.NewName):
                        </td>
                        <td>
                            @Html.EditorFor(model => model.NewName)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            @Html.NopLabelFor(model => model.OpenBoxQuantity):
                        </td>
                        <td>
                            @Html.EditorFor(model => model.OpenBoxQuantity)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            @Html.NopLabelFor(model => model.NewPrice):
                        </td>
                        <td>
                            @Html.EditorFor(model => model.NewPrice)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            @Html.NopLabelFor(model => model.Published):
                        </td>
                        <td>
                            @Html.EditorFor(model => model.Published)
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <input type="submit" class="t-button" value="@T("Admin.Catalog.ProductVariants.OpenBox")" />
                        </td>
                    </tr>
                </table>
            }
        </text>)
        .Width(400)
        .Draggable(true)
        .Modal(true)
        .Visible(false)
        .Render();
}
<script type="text/javascript">
    $(document).ready(function () {

        $("#copy-productvariant").click(function (e) {
            e.preventDefault();
            $('#copy-productvariant-window').data('tWindow').center().open();
        });
    });
</script>